package com.zhf.cloud.gateway.springcloudgateway.model.user;

import com.zhf.cloud.gateway.springcloudgateway.entity.MerchantModulePermission;
import lombok.Data;

import java.io.Serializable;

/**
 * @author: 曾鸿发
 * @create: 2021-11-22 11:51
 * @description：
 **/
@Data
public class NewActionEntity  implements Serializable {

    private static final long serialVersionUID = 1274995709502120629L;

    private String action;
    private String describe;
    private Boolean defaultCheck;

    public static NewActionEntity convertFromMerchantModulePermission(MerchantModulePermission merchantModulePermission) {

        NewActionEntity newActionEntity = new NewActionEntity();
        newActionEntity.setAction(merchantModulePermission.getAction());
        newActionEntity.setDescribe(merchantModulePermission.getDescribe());
        newActionEntity.setDefaultCheck(merchantModulePermission.getDefaultCheck());

        return newActionEntity;
    }
}
